package com.yhb.channel;

import org.jetbrains.annotations.Nullable;

import java.util.Arrays;
import java.util.List;


public class ChannelAlias {

    public static final List<List<String>> bankAlias = Arrays.asList(
            Arrays.asList("民生银行", "中国民生银行"),
            Arrays.asList("农业银行", "中国农业银行"),
            Arrays.asList("邮储银行", "中国邮政储蓄银行"),
            Arrays.asList("广发银行", "广东发展银行"),
            Arrays.asList("光大银行", "中国光大银行"),
            Arrays.asList("上海浦东发展银行", "浦东发展银行", "浦发银行")
    );

    @Nullable
    public static List<String> getBankAlias(String bankName) {
        return bankAlias.parallelStream()
                .filter(bankList -> bankList.contains(bankName))
                .findAny()
                .orElse(null)
                ;
    }

    public static void main(String[] args) {
        System.out.println(getBankAlias("浦东发展银行"));
    }
}
